home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Games / Xconq 7.0d16 / lib / cave.g < prev    next >
Encoding:
Text File  |  1993-12-20  |  2.0 KB  |  127 lines  |  [TEXT/MPS ]

  1. (game-module "cave"
  2.   (title "Cave")
  3.   (blurb "Cave Exploration")
  4. ;  (variants (see-all false))
  5. )
  6.  
  7. (terrain-type floor (color "light gray") (char "."))
  8. (terrain-type passage (color "light gray") (char "."))
  9. (terrain-type rock (color "dark gray")  (char "#"))
  10.  
  11. (unit-type human (image-name "person") (char "@"))
  12.  
  13. (unit-type orc)
  14. (unit-type elf)
  15. (unit-type dwarf)
  16.  
  17. (unit-type dragon)
  18. (unit-type pit-demon)
  19.  
  20. (unit-type diamond (name "huge diamond") (char "*"))
  21.  
  22. (define wimps (orc elf dwarf))
  23. (define nasties (dragon pit-demon))
  24. (define monster (append wimps nasties))
  25. (define animate (append human monster))
  26. (define items (diamond))
  27.  
  28. (material-type food)
  29. (material-type water)
  30. (material-type gold)
  31.  
  32. ;;; Static relationships.
  33.  
  34. (include "ng-weird")
  35.  
  36. (add human namer "generic-names")
  37.  
  38. (add human possible-sides "human")
  39.  
  40. (add monster possible-sides "monster")
  41.  
  42. (add human storage 100)
  43.  
  44. (table material-size-in-unit
  45.   (human m* (10 20 1))
  46.   )
  47.  
  48. ;;; Vision.
  49.  
  50. (add u* vision-range 4)
  51.  
  52. ;;; Action parameters.
  53.  
  54. (add animate acp-per-turn 4)
  55.  
  56. ;;; Movement parameters.
  57.  
  58. (table mp-to-enter-terrain
  59.   (u* rock 99)
  60.   )
  61.  
  62. ;;; Combat parameters.
  63.  
  64. (add u* hp-max 10)
  65.  
  66. (table hit-chance
  67.   (u* u* 50)
  68.   )
  69.  
  70. (table damage
  71.   (u* u* 1)
  72.   )
  73.  
  74. ;; Dwarves can dig.
  75.  
  76. (table acp-to-add-terrain
  77.   (dwarf (floor passage) 1)
  78.   )
  79.  
  80. (table acp-to-remove-terrain
  81.   (dwarf rock 1)
  82.   )
  83.  
  84. ;;; Backdrop activities.
  85.  
  86. (add u* hp-recovery 100)
  87.  
  88. ;;; Random setup.
  89.  
  90. (add floor maze-room-occurrence 1)
  91.  
  92. (add passage maze-passage-occurrence 1)
  93.  
  94. (add t* occurrence 0)
  95.  
  96. (add rock occurrence 1)
  97.  
  98. ;;; One adventurer on a side.
  99.  
  100. (add human start-with 1)
  101. (add wimps start-with 3)
  102. (add nasties start-with 1)
  103.  
  104. (set country-radius-min 4)
  105. (set country-separation-min 15)
  106. (set country-separation-max 20)
  107.  
  108. (table favored-terrain
  109.   (u* floor 100)
  110.   (u* rock 0)
  111.   )
  112.  
  113. (set synthesis-methods
  114.   '(make-maze-terrain make-countries make-independent-units))
  115.  
  116. (set sides-min 1)
  117.  
  118. (side 1 (name "You") (class "human"))
  119.  
  120. (side 2 (noun "Monster") (class "monster") (emblem-name "none"))
  121.  
  122. (scorekeeper (do last-side-wins))
  123.  
  124. (game-module (notes (
  125.   "Cave exploration."
  126.   )))
  127.